import request from '@/utils/request'

// 根据ID更新权限点详情
export const updatePermission = data => {
  return request.put(`/sys/permission/${data.id}`, data)
}

// 根据ID获取权限点详情
export const getPermissionDetail = id => {
  return request.get(`/sys/permission/${id}`)
}

// 根据id删除权限点
export const delPermission = id => {
  return request.delete(`/sys/permission/${id}`)
}

// 添加权限点
export const addPermission = data => {
  return request.post('/sys/permission', data)
}

// 获取权限列表 /sys/permission
export const getPermissionList = () => {
  return request.get('/sys/permission')
}
